
hq.zoomReminder  = {

	init : function() {
		this.dom = $j('#zoomReminder');

		$j('#closeReminder').click(toolbox.delegate(this.close, this));

                GEvent.addListener( hq.map.gMap, 'zoomend', toolbox.delegate( this.zoomEnd,  this ) );
		this.zoomEnd();

	},
	
	zoomEnd : function() {
		var zoom = hq.map.gMap.getZoom();
		var layerZoom = hq.spacePolygon.CensusLevel;

		if(layerZoom && zoom < layerZoom)
			this.show();
		else
			this.close();
	},

	show : function() {
      		this.dom.animate({ 
        		height: "20px"
	
		      }, 2000);
	},
	close : function() {
		this.dom.animate({
                        height: "hide"
                 }, 2000);
	}
	
};


$j(document).ready(toolbox.delegate(hq.zoomReminder.init, hq.zoomReminder));


